#include "app_buffer.h"

int main(int argc, char const *argv[])
{
    buffer_t *buffer = app_buffer_init(1024);
    char data[128];
    for (int i = 0; i < 128; i++)
    {
        data[i] = 'a';
    }

    app_buffer_write(buffer, data, sizeof(data));

    char read_buf1[256];
    int buf1_len = app_buffer_read(buffer, read_buf1, 256);
    log_info("第一次读取数据 %.*s,长度为：%d", buf1_len, read_buf1, buf1_len);


    return 0;
}
